<!--工程划分-->
<template>
  <div class="department">
    <!-- 左侧部门管理 -->
    <div class="structureTree" v-if="treelength">
      <div class="structureTree_title">
        <div>组织机构</div>
        <div>
          <!-- <el-checkbox v-model="checked"  @change="see()">查看下级</el-checkbox> -->
        </div>
      </div>

      <tree
        :treeData="treeData"
        :checkData="checkData"
        name="currencyList"
        nodeKey="fCompanyid"
        @getTreeInfo="handleNodeClick"
        :defaultProps="defaultProps"
      >
      </tree>
    </div>
    <!-- 右侧 -->
    <div class="department_right">
      <!-- 部门信息 -->
      <div class="department_right_name">
        <div>{{ showName }}</div>
      </div>
      <!-- 顶部导航栏 -->
      <div class="mechanism_nav">
        <!-- 左侧 -->
        <div class="mechanism_nav_left"></div>
        <!-- 右侧 -->
        <div class="print">
          <div class="printTable">
            <el-button
              type="primary"
              icon="el-icon-refresh"
              size="small"
              @click="getDataList(companyId)"
            ></el-button>
            <el-button
              type="primary"
              v-if="lr_view"
              icon="el-icon-search"
              size="small"
              @click="getCheckList(fId)"
              >查看
            </el-button>
          </div>
        </div>
      </div>

      <!-- 表格 -->
      <div class="text_table">
        <el-table
          ref="multipleTable"
          :data="tableData5"
          style="width: 100%"
          :height="navigatepageNums > 1 ? 'calc(100% - 20px)' : '100%'"
          border
          default-expand-all
          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
          row-key="F_CompanyId"
          v-loading="loadings"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
          @row-click="getRowInfo1"
          highlight-current-row
          @current-change="rowChange"
          stripe
        >
          <el-table-column
            type="index"
            label="序号"
            width="50"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="F_CompanyId"
            label="工程编号"
          ></el-table-column>
          <el-table-column
            prop="F_ShortName"
            label="工程名称"
            width="180"
          ></el-table-column>
          <el-table-column prop="F_Nature" label="工程类别" width="90">
          </el-table-column>
          <el-table-column
            prop="F_Note"
            label="回弹设计值"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="cous"
            label="回弹任务数"
            width="120"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="iscous"
            label="回弹完成数"
            width="120"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="price"
            label="回弹完成率"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="isHave"
            label="回弹资料"
            width="90"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="openDialog1(scope.row)"
                @cell-dblclick="openDialog1"
                type="text"
                size="small"
                v-if="scope.row.isHave > 0 && scope.row.F_Note != ''"
              >
                查看
              </el-button>
            </template>
          </el-table-column>
          <el-table-column
            prop="F_ProtectionNote"
            label="厚度设计值"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="cousProtection"
            label="厚度应检数"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="isGJcous"
            label="厚度已检测"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="GJprice"
            label="厚度完成率"
            width="90"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="isGJHave"
            label="厚度资料"
            width="75"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="openDialog2(scope.row)"
                @cell-dblclick="openDialog2"
                type="text"
                size="small"
                v-if="
                  scope.row.isGJHave > 0 && scope.row.F_ProtectionNote != ''
                "
              >
                查看
              </el-button>
            </template>
          </el-table-column>

          <template slot="empty">
            <img
              style="width: 285px; height: 208px"
              src="@/assets/img/undata.png"
              alt=""
            />
            <div class="pageFlagText">暂时没有数据哦！</div>
          </template>
        </el-table>
      </div>
    </div>

    <!-- 混凝土 -->
    <!-- 查看弹框 -->
    <div class="pdfWidth">
      <el-dialog
        :close-on-click-modal="false"
        title="查看"
        v-dialogDrag
        :visible.sync="dialogCheckVisible"
        v-loading="loadingCheckDialog"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.2)"
      >
        <el-menu
          :default-active="activeIndexs"
          class="el-menu-demo"
          mode="horizontal"
        >
          <el-menu-item index="1">记录报告信息</el-menu-item>
        </el-menu>
        <div
          v-if="activeIndexs == 1"
          class="dialogBody"
          style="margin-top: 10px"
          :style="{ height: dialogHeightsa }"
        >
          <el-table
            ref="multipleTable"
            v-loading="loading"
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
            element-loading-background="rgba(0, 0, 0, 0.2)"
            @row-click="getRowInfo(1)"
            :data="CheckList"
            style="width: 100%"
            height="100%"
            stripe
            border
          >
            <el-table-column
              label="序号"
              fixed
              type="index"
              width="55"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="fProjectname"
              label="建设项目简称"
              width="130"
              align="left"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fProjectname">{{
                    scope.row.fProjectname
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fCompanyname"
              label="施工标段简称"
              width="110"
              align="left"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fCompanyname">{{
                    scope.row.fCompanyname
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fReportno"
              label="报告编号"
              width="190"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="openDialog(scope.row)"
                  @cell-dblclick="openDialog"
                  type="text"
                  size="small"
                >
                  {{ scope.row.fReportno }}
                </el-button>
              </template>
            </el-table-column>
            <el-table-column
              prop="fReportdates"
              label="报告日期"
              width="100"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="fSamplingno"
              label="样品编号"
              width="190"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fSamplingno">{{
                    scope.row.fSamplingno
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fMarkno"
              label="记录编号"
              width="190"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fMarkno">{{
                    scope.row.fMarkno
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fProjecttypename"
              label="工程部位/用途"
              width="160"
              align="left"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fProjecttypename">{{
                    scope.row.fProjecttypename
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fTestdates"
              label="试验检测日期"
              width="110"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="fTestnote"
              label="检测依据"
              width="110"
              align="left"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fTestnote">{{
                    scope.row.fTestnote
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fJudgetype"
              label="判定依据"
              width="130"
              align="left"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fJudgetype">{{
                    scope.row.fJudgetype
                  }}</a>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div
          v-if="activeIndexs == 2"
          class="dialogBody"
          :style="{ height: dialogHeight }"
        ></div>
      </el-dialog>
    </div>
    <!-- 按检测记录新增/编辑 -->
    <div class="steelSheet Control-1">
      <el-dialog
        v-dialogDrag
        :close-on-click-modal="false"
        :title="dialogText"
        :visible.sync="dialogTableVisible"
        v-loading="loadingDialog"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.2)"
      >
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
        >
          <el-menu-item index="1">混凝土回弹检测记录表</el-menu-item>
          <el-menu-item index="2">混凝土回弹检测报告</el-menu-item>
        </el-menu>
        <div
          v-show="activeIndex == 1"
          class="dialogBody common"
          :style="{ height: dialogHeights }"
        >
          <header>
            现场混凝土强度检测记录表(回弹法)
            <div class="printTable">
              <el-button
                type="primary"
                icon="el-icon-printer"
                size="small"
                @click="Print(1)"
                >打印表格
              </el-button>
            </div>
          </header>

          <div
            class="top_box top_1"
            style="border-bottom: 1px solid #ccc"
            id="checkForm1"
          >
            <div class="bottom1_1" style="background: #f5f7fa">检测类型：</div>
            <div class="bottom1_2" ref="fChecktype">
              <el-input
                disabled
                v-model="formData.fChecktype"
                placeholder="/"
              ></el-input>
            </div>
          </div>
          <!-- 头部 -->
          <div class="title">
            <div class="title_Name title_record">
              <div class="title_input_text">检测单位名称：</div>
              <div
                class="title_input_con"
                v-text="formData.fLeadercompanyfullname"
              ></div>
            </div>
            <div class="title_input">
              <div class="title_input_text">记录编号：</div>
              <div class="title_input_con">{{ formData.fMarkno }}</div>
              <!-- <div class="title_input_con"  >{{fMarkno}}</div> -->
            </div>
          </div>
          <!-- 工程名称 -->
          <div class="top_box top_1">
            <div class="bottom1_1" style="background: #f5f7fa">工程名称</div>
            <div class="bottom1_2">
              <el-input
                disabled
                v-model="formData.fProjectfullname"
                placeholder="/"
              ></el-input>
            </div>
          </div>
          <!-- @change="function(item){ return TestnoteSelectId(item)}" -->
          <!-- 工程部位/用途 -->
          <div class="top_box top_1">
            <div class="bottom1_1">工程部位/用途</div>

            <div class="bottom1_2" ref="fProjecttypename">
              <el-input
                disabled
                v-model="formData.fProjecttypename"
                placeholder="/"
              ></el-input>
            </div>
          </div>

          <!-- 样品信息 -->
          <div class="top_box top_1">
            <div class="bottom1_1">样品信息</div>
            <div
              class="bottom1_2"
              ref="fSamplename"
              style="background-color: #f5f7fa"
            >
              <el-input v-model="sample" placeholder="/" disabled></el-input>
            </div>
          </div>
          <!--  -->
          <!-- 试验检测日期 -->
          <div class="top_box top_1">
            <div class="top_4">
              <div class="bottom1_1">试验检测日期</div>
              <div class="bottom1_2" ref="fTestdates">
                <el-input
                  disabled
                  v-model="formData.fTestdates"
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                试验条件
              </div>
              <div class="bottom1_2" ref="fTesttype">
                <el-input
                  disabled
                  v-model="formData.fTesttype"
                  placeholder="/"
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 检测依据 -->
          <div class="top_box top_1">
            <div class="top_4">
              <div class="bottom1_1">检测依据</div>
              <div class="bottom1_2" ref="fTestnote">
                <el-input
                  v-model="formData.fTestnote"
                  disabled
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                判定依据
              </div>
              <div class="bottom1_2" ref="fJudgetype">
                <el-input
                  v-model="formData.fJudgetype"
                  disabled
                  placeholder="/"
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 主要仪器设备名称及编号 -->
          <div class="top_box top_1 top_2 hhgy hgjk">
            <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
            <!-- <div class="bottom1_2" style="background-color: #f5f7fa" @click="equipment()">
                <el-input v-model="formData.fEquipmentname" placeholder="/" disabled></el-input>
                                                        </div> -->
            <!-- collapse-tags -->
            <!--  -->
            <div class="bottom1_2" ref="fEquipmentname">
              <el-input
                v-model="fEquipmentname"
                disabled
                placeholder="/"
              ></el-input>
            </div>
          </div>
          <!-- 钢筋工称直径 -->
          <div class="top_box top_1">
            <div class="top_4 top_3">
              <div class="bottom1_1">测区强度换算表</div>
              <div class="bottom1_2 selectCenter" ref="fConcretetype">
                <el-input
                  v-model="formData.fConcretetype"
                  disabled
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                实测数量(测区)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fTestnum"
                  placeholder="/"
                  class="center_text"
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 报告编号 -->
          <div class="top_box top_1">
            <div class="top_4 top_3">
              <div class="bottom1_1">回弹测试方向</div>
              <div class="bottom1_2 selectCenter" ref="fDirection">
                <el-input
                  v-model="formData.fDirection"
                  disabled
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                标准差S(MPa)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fStandarddeviation"
                  placeholder="/"
                  class="center_text"
                >
                </el-input>
              </div>
            </div>
          </div>
          <!-- 构件名称 -->
          <div class="top_box top_1">
            <div class="top_4 top_3">
              <div class="bottom1_1">检测浇筑面</div>
              <div
                class="bottom1_2 selectCenter"
                ref="fSurface"
                style="text-align: center"
              >
                <el-input
                  v-model="formData.fSurface"
                  disabled
                  placeholder="/"
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                混凝土强度推定值(MPa)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fConcreteresult"
                  placeholder="/"
                  class="center_text"
                ></el-input>
              </div>
            </div>
          </div>

          <!-- 表格 -->
          <div class="table_recordSheetf">
            <!-- 左侧数据1-20 -->
            <div
              class="recordSheet"
              style="width: 100%; box-sizing: border-box"
            >
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column label="测区" width="48"> </el-table-column>
                <el-table-column label="各测点实测回弹值Ni">
                  <el-table-column label="1" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="2" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="3" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="4" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="5" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="6" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="7" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="8" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="9" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="10" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="11" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="12" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="13" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="14" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="15" :width="widthTab">
                  </el-table-column>
                  <el-table-column label="16" :width="widthTab">
                  </el-table-column>
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_boxf"
                v-for="(v, i) in formData.checkConcretesampleitems"
                :key="i"
              >
                <div
                  class="recordSheet_box_1f row1_2"
                  style="color: #676d77; font-size: 12px"
                >
                  <el-input
                    v-model="v.fOrder"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2" ref="focus">
                  <el-input
                    ref="fParam1"
                    disabled
                    v-model="v.fParam1"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_3">
                  <el-input
                    ref="fParam2"
                    disabled
                    v-model="v.fParam2"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_4">
                  <el-input
                    ref="fParam3"
                    disabled
                    v-model="v.fParam3"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_5">
                  <el-input
                    ref="fParam4"
                    disabled
                    v-model="v.fParam4"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam5"
                    disabled
                    v-model="v.fParam5"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam6"
                    disabled
                    v-model="v.fParam6"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_3">
                  <el-input
                    ref="fParam7"
                    disabled
                    v-model="v.fParam7"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_4">
                  <el-input
                    ref="fParam8"
                    disabled
                    v-model="v.fParam8"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_5">
                  <el-input
                    ref="fParam9"
                    disabled
                    v-model="v.fParam9"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam10"
                    disabled
                    v-model="v.fParam10"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam11"
                    disabled
                    v-model="v.fParam11"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_3">
                  <el-input
                    ref="fParam12"
                    disabled
                    v-model="v.fParam12"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_4">
                  <el-input
                    ref="fParam13"
                    disabled
                    v-model="v.fParam13"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_5">
                  <el-input
                    ref="fParam14"
                    disabled
                    v-model="v.fParam14"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam15"
                    disabled
                    v-model="v.fParam15"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3f row1_2">
                  <el-input
                    ref="fParam16"
                    disabled
                    v-model="v.fParam16"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
              </div>
            </div>
          </div>
          <!-- 表二 -->
          <div class="table_recordSheetfv" id="steelSheet">
            <!-- 左侧数据1-20 -->
            <div
              class="recordSheet"
              style="width: 100%; box-sizing: border-box"
            >
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column label="测区" width="158"> </el-table-column>
                <el-table-column label="1" :width="widthTab1">
                </el-table-column>
                <el-table-column label="2" :width="widthTab1">
                </el-table-column>
                <el-table-column label="3" :width="widthTab1">
                </el-table-column>
                <el-table-column label="4" :width="widthTab1">
                </el-table-column>
                <el-table-column label="5" :width="widthTab1">
                </el-table-column>
                <el-table-column label="6" :width="widthTab1">
                </el-table-column>
                <el-table-column label="7" :width="widthTab1">
                </el-table-column>
                <el-table-column label="8" :width="widthTab1">
                </el-table-column>
                <el-table-column label="9" :width="widthTab1">
                </el-table-column>
                <el-table-column label="10" :width="widthTab1">
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_boxf"
                v-for="(v, i) in formData.checkConcretesampleresult"
                :key="i"
              >
                <div
                  class="recordSheet_box_1fv row1_2"
                  style="color: #676d77; font-size: 12px"
                >
                  <el-input
                    v-model="v.fNote"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult1"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_3">
                  <el-input
                    disabled
                    v-model="v.fResult2"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_4">
                  <el-input
                    disabled
                    v-model="v.fResult3"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_5">
                  <el-input
                    disabled
                    v-model="v.fResult4"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult5"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult6"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_3">
                  <el-input
                    disabled
                    v-model="v.fResult7"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_4">
                  <el-input
                    disabled
                    v-model="v.fResult8"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_5">
                  <el-input
                    disabled
                    v-model="v.fResult9"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult10"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
              </div>
            </div>
          </div>

          <!-- 附加声明 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">附加声明</div>
            <div class="bottom1_2">
              <el-input disabled v-model="formData.fNote"></el-input>
            </div>
          </div>
        </div>
        <!-- 钢筋保护层厚度试验检测报告 -->
        <div
          v-show="activeIndex == 2"
          class="dialogBody common reportSheet"
          :style="{ height: dialogHeights }"
        >
          <header>
            现场混凝土强度检测报告
            <div class="printTable">
              <el-button
                type="primary"
                icon="el-icon-printer"
                size="small"
                @click="Print(2)"
                >打印表格
              </el-button>
            </div>
          </header>
          <!-- 头部 -->
          <div class="title">
            <div class="title_Name">
              <div class="title_input_text">检测单位名称(专用章):</div>
              <div
                class="title_input_con"
                v-text="formData.fLeadercompanyfullname"
              ></div>
            </div>
            <div class="title_input">
              <div class="title_input_text">报告编号：</div>
              <div class="title_input_con" v-text="formData.fReportno"></div>
            </div>
          </div>
          <!-- 施工/委托单位 -->
          <div
            class="top_box top_1 top_boxh"
            style="height: 50px !important; line-height: 50px"
          >
            <div
              class="top_4"
              style="height: 50px !important; line-height: 50px !important"
            >
              <div class="bottom1_1" style="line-height: 50px !important">
                施工/委托单位
              </div>
              <div
                class="bottom1_2"
                style="display: flex; word-break: break-all"
              >
                {{ formData.fCompanyfullname }}
              </div>
            </div>
            <div class="top_4">
              <div
                class="bottom1_1"
                style="
                  border-left: 1px solid #ccc;
                  line-height: 50px !important;
                "
              >
                工程名称
              </div>
              <div class="bottom1_2">{{ formData.fProjectfullname }}</div>
            </div>
          </div>
          <!-- 工程部位/用途 -->
          <div class="top_box top_1 top_boxh">
            <div class="bottom1_1">工程部位/用途</div>
            <div
              class="bottom1_2 hbhg"
              ref="fProjecttypename1"
              style="padding: 0 !important"
            >
              <el-input
                disabled
                v-model="formData.fProjecttypename"
                placeholder="/"
              ></el-input>
            </div>
          </div>
          <!-- 样品信息 -->
          <div class="top_box top_1 top_boxh">
            <div class="bottom1_1">样品信息</div>
            <div
              class="bottom1_2"
              ref="fSamplename1"
              style="background-color: #f5f7fa"
            >
              <el-input v-model="sample" placeholder="/" disabled></el-input>
            </div>
          </div>
          <div class="top_box top_1 top_boxh">
            <div class="top_4">
              <div class="bottom1_1">报告日期</div>
              <div class="bottom1_2" ref="fReportdates">
                <el-input
                  v-model="formData.fReportdates"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
            <div class="top_4">
              <div class="bottom1_1">是否合格</div>
              <div class="bottom1_2" ref="fIstrue">
                <el-input
                  v-model="formData.fIstrue"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
          </div>

          <!-- 检测依据 -->
          <div class="top_box top_1 top_boxh">
            <div class="top_4">
              <div class="bottom1_1">检测依据</div>
              <div class="bottom1_2" ref="fTestnote1">
                <el-input
                  v-model="formData.fTestnote"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                判定依据
              </div>
              <div class="bottom1_2" ref="fJudgetype1">
                <el-input
                  v-model="formData.fJudgetype"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 主要仪器设备名称及编号 -->
          <div class="top_box top_1 top_2">
            <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
            <div class="bottom1_2" ref="fEquipmentname1">
              <el-input
                v-model="fEquipmentname"
                placeholder="/"
                disabled
              ></el-input>
            </div>
          </div>
          <!-- 龄期 -->
          <div class="top_box top_1 top_boxh">
            <div class="top_4">
              <div class="bottom1_1">龄期(d)</div>
              <div class="bottom1_2" ref="fSpecimenage">
                <el-input
                  disabled
                  v-model="formData.fSpecimenage"
                  placeholder="/"
                >
                </el-input>
              </div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                设计强度等级
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fConcretelevel"
                  placeholder="/"
                ></el-input>
              </div>
            </div>
          </div>

          <!-- 钢筋工称直径 -->
          <div class="top_box top_1 top_boxh">
            <div class="top_4 top_3">
              <div class="bottom1_1">测区强度换算表</div>
              <div class="bottom1_2 selectCenter" ref="fConcretetype1">
                <el-input
                  v-model="formData.fConcretetype"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                实测数量(测区)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fTestnum"
                  placeholder="/"
                  class="center_text"
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 报告编号 -->
          <div class="top_box top_1 top_boxh">
            <div class="top_4 top_3">
              <div class="bottom1_1">回弹测试方向</div>
              <div class="bottom1_2 selectCenter" ref="fDirection1">
                <el-input
                  v-model="formData.fDirection"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                标准差S(MPa)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fStandarddeviation"
                  placeholder="/"
                  class="center_text"
                >
                </el-input>
              </div>
            </div>
          </div>
          <!-- 构件名称 -->
          <div class="top_box top_1 top_boxh">
            <div class="top_4 top_3">
              <div class="bottom1_1">检测浇筑面</div>
              <div class="bottom1_2 selectCenter" ref="fSurface1">
                <el-input
                  v-model="formData.fSurface"
                  placeholder="/"
                  disabled
                ></el-input>
              </div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                混凝土强度推定值(MPa)
              </div>
              <div class="bottom1_2">
                <el-input
                  disabled
                  v-model="formData.fConcreteresult"
                  placeholder="/"
                  class="center_text"
                ></el-input>
              </div>
            </div>
          </div>
          <!-- 表格 -->
          <div class="table_recordSheetfvs table369">
            <!-- 左侧数据1-20 -->
            <div
              class="recordSheet"
              style="width: 100%; box-sizing: border-box"
            >
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column label="测区" width="158"> </el-table-column>
                <el-table-column label="1" :width="widthTab1">
                </el-table-column>
                <el-table-column label="2" :width="widthTab1">
                </el-table-column>
                <el-table-column label="3" :width="widthTab1">
                </el-table-column>
                <el-table-column label="4" :width="widthTab1">
                </el-table-column>
                <el-table-column label="5" :width="widthTab1">
                </el-table-column>
                <el-table-column label="6" :width="widthTab1">
                </el-table-column>
                <el-table-column label="7" :width="widthTab1">
                </el-table-column>
                <el-table-column label="8" :width="widthTab1">
                </el-table-column>
                <el-table-column label="9" :width="widthTab1">
                </el-table-column>
                <el-table-column label="10" :width="widthTab1">
                </el-table-column>
                <el-table-column label="11" :width="widthTab1">
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_box"
                v-for="(v, i) in formData.checkConcretesampleresult"
                :key="i"
              >
                <div
                  class="recordSheet_box_1fvs row1_2"
                  style="color: #676d77; font-size: 12px"
                >
                  <!-- {{i+1}} -->
                  <el-input
                    v-model="v.fNote"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult1"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_3">
                  <el-input
                    disabled
                    v-model="v.fResult2"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_4">
                  <el-input
                    disabled
                    v-model="v.fResult3"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_5">
                  <el-input
                    disabled
                    v-model="v.fResult4"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult5"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult6"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_3">
                  <el-input
                    disabled
                    v-model="v.fResult7"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_4">
                  <el-input
                    disabled
                    v-model="v.fResult8"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_5">
                  <el-input
                    disabled
                    v-model="v.fResult9"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3fv row1_2">
                  <el-input
                    disabled
                    v-model="v.fResult10"
                    placeholder="/"
                    class="center_text"
                  ></el-input>
                </div>
              </div>
            </div>
          </div>
          <!--底部 第一行 -->

          <!-- 检测结论 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">检测结论</div>
            <div class="bottom1_2" ref="fTestresult">
              <!-- <el-input v-model="formData.fTestresult"></el-input> -->
              <el-input
                v-model="formData.fTestresult"
                placeholder="/"
                disabled
              ></el-input>
            </div>
          </div>
          <!-- 附加声明 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">附加声明</div>
            <div class="bottom1_2">
              <el-input v-model="formData.fNote"></el-input>
            </div>
          </div>
          <!-- 监理意见及签字 -->
          <!-- <div class="bottom_box box3 top_boxh">
              <div class="bottom1_1">监理意见及签字</div>
              <div class="bottom1_2">
                <el-input v-model="supervisor"></el-input>
              </div>
                                                      </div> -->
        </div>
      </el-dialog>
    </div>

    <!-- 钢筋 -->
    <!-- 表格 -->
    <div class="pdfWidth">
      <el-dialog
        v-dialogDrag
        :close-on-click-modal="false"
        title="厚度资料查看"
        :visible.sync="dialogCheckVisibleGJ"
        v-loading="loadingCheckDialogGJ"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.2)"
      >
        <el-menu
          :default-active="activeIndexs"
          class="el-menu-demo"
          mode="horizontal"
        >
          <el-menu-item index="1">记录报告信息</el-menu-item>
        </el-menu>
        <div
          v-if="activeIndexs == 1"
          class="dialogBody"
          style="margin-top: 10px"
          :style="{ height: dialogHeightsa }"
        >
          <el-table
            ref="multipleTableA"
            v-loading="loading"
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
            element-loading-background="rgba(0, 0, 0, 0.2)"
            :data="tableData"
            style="width: 100%"
            height="100%"
            stripe
            border
            highlight-current-row
            @current-change="rowChange"
          >
            <el-table-column
              fixed
              type="index"
              label="序号"
              width="50"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="fProjectname"
              label="建设项目简称"
              width="180"
            >
              <!-- 超出鼠标滑过显示 -->
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fProjectname">{{
                    scope.row.fProjectname
                  }}</a>
                </div>
              </template>
            </el-table-column>

            <el-table-column
              prop="fClientname"
              label="施工标段简称"
              width="120"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fClientname">{{
                    scope.row.fClientname
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fReportnumber"
              label="报告编号"
              width="180"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="details(scope.row)"
                  @cell-dblclick="details"
                  type="text"
                  size="small"
                  style="padding: 0 !important; margin: 0"
                >
                  {{ scope.row.fReportnumber }}
                </el-button>
              </template>
            </el-table-column>
            <el-table-column
              prop="fReportdates"
              label="报告日期"
              width="120"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fReportdates">{{
                    scope.row.fReportdates
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fSamplenumber"
              label="样品编号"
              width="180"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fSamplenumber">{{
                    scope.row.fSamplenumber
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fRecordnumber"
              label="记录编号"
              width="180"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fRecordnumber">{{
                    scope.row.fRecordnumber
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fProjectpartandapp"
              label="工程部位/用途"
              width="200"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a
                    href="javascript:;"
                    :title="scope.row.fProjectpartandapp"
                    >{{ scope.row.fProjectpartandapp }}</a
                  >
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fCheckdates"
              label="试验检测日期"
              width="100"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fCheckdates">{{
                    scope.row.fCheckdates
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fCheckreference"
              label="检测依据"
              width="120"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fCheckreference">{{
                    scope.row.fCheckreference
                  }}</a>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              prop="fDecidereference"
              label="判定依据"
              width="120"
              align="center"
            >
              <template slot-scope="scope">
                <div class="lineBoxhidden">
                  <a href="javascript:;" :title="scope.row.fDecidereference">{{
                    scope.row.fDecidereference
                  }}</a>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-dialog>
    </div>
    <!-- 查看 -->
    <div class="steelSheet Control-1 big_dialog">
      <el-dialog
        title="厚度查看"
        v-dialogDrag
        :visible.sync="dialogTableVisibleSee"
        v-loading="loadingDialogSee"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.2)"
      >
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
        >
          <el-menu-item index="1">钢筋保护层厚度试验检测记录表</el-menu-item>
          <el-menu-item index="2">钢筋保护层厚度试验检测报告</el-menu-item>
        </el-menu>
        <div
          v-if="activeIndex == 1"
          class="dialogBody common"
          :style="{ height: dialogHeights }"
        >
          <header>
            钢筋保护层厚度试验检测记录表
            <div class="printTable">
              <el-button
                type="primary"
                icon="el-icon-printer"
                size="small"
                @click="Print(3)"
                >打印表格
              </el-button>
            </div>
          </header>
          <!-- 检测类型 -->
          <div
            class="top_box top_1"
            style="border-bottom: 1px solid #ccc"
            id="checkForm1"
          >
            <div class="bottom1_1" style="background: #f5f7fa">检测类型：</div>
            <div class="bottom1_2" v-text="formDataGJ.fChecktype"></div>
          </div>
          <!-- 头部 -->
          <div class="title">
            <div class="title_Name title_record">
              <div class="title_input_text">检测单位名称：</div>
              <div
                class="title_input_con"
                v-text="formDataGJ.fCheckcompanyfullname"
              ></div>
            </div>
            <div class="title_input">
              <div class="title_input_text">记录编号：</div>
              <div
                class="title_input_con"
                v-text="formDataGJ.fRecordnumber"
              ></div>
            </div>
          </div>
          <!-- 工程名称 -->
          <div class="top_box top_1">
            <div class="bottom1_1" style="background: #f5f7fa">工程名称</div>
            <div class="bottom1_2" v-text="formDataGJ.fProjectfullname"></div>
          </div>
          <!-- 工程部位/用途 -->
          <div class="top_box top_1" id="checkForm2">
            <div class="bottom1_1">工程部位/用途</div>
            <div class="bottom1_2" v-text="formDataGJ.fProjectpartandapp"></div>
          </div>
          <!-- 样品信息 -->
          <div class="top_box top_1" id="checkForm3">
            <div class="bottom1_1">样品信息</div>
            <div class="bottom1_2" v-text="sample"></div>
          </div>
          <!-- 试验检测日期 -->
          <div class="top_box top_1">
            <div class="top_4">
              <div class="bottom1_1">试验检测日期</div>
              <div class="bottom1_2" v-text="formDataGJ.fCheckdates"></div>
            </div>
            <div class="top_4" id="checkForm4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                试验条件
              </div>
              <div
                class="bottom1_2"
                v-text="formDataGJ.fCheckenvironment"
              ></div>
            </div>
          </div>
          <!-- 检测依据 -->
          <div class="top_box top_1">
            <div class="top_4" id="checkForm5">
              <div class="bottom1_1">检测依据</div>
              <div class="bottom1_2" v-text="formDataGJ.fCheckreference"></div>
            </div>
            <div class="top_4" id="checkForm6">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                判定依据
              </div>

              <div class="bottom1_2" v-text="formDataGJ.fDecidereference"></div>
            </div>
          </div>
          <!-- 主要仪器设备名称及编号 -->
          <div class="top_box top_1 top_2" id="checkForm7">
            <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
            <div
              class="bottom1_2"
              v-text="formDataGJ.fMajorequipnameandnumber"
            ></div>
          </div>
          <!-- 钢筋工称直径 -->
          <div class="top_box top_1">
            <div class="top_4 top_3" id="checkForm8">
              <div class="bottom1_1">钢筋公称直径</div>
              <div class="bottom1_2" v-text="formDataGJ.fDiameter"></div>
            </div>
            <div class="top_4 top_3" id="checkForm9">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                修正值
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fCc"></div>
            </div>
          </div>
          <!-- 报告编号 -->
          <div class="top_box top_1">
            <div class="top_4 top_3">
              <div class="bottom1_1">报告编号</div>
              <div class="bottom1_2" v-text="formDataGJ.fReportnumber"></div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                报告日期
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fReportdates"></div>
            </div>
          </div>
          <!-- 构件名称 -->
          <div class="top_box top_1">
            <div class="top_4 top_3" id="checkForm10">
              <div class="bottom1_1">构件名称</div>
              <div class="bottom1_2" v-text="formDataGJ.fComponentname"></div>
            </div>
            <div class="top_4 top_3" id="checkForm12">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                钢筋保护层厚度设计值Dnd(mm)
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fDnd"></div>
            </div>
          </div>
          <!-- 垫块厚度C -->
          <div class="top_box top_1">
            <div class="top_4 top_3" id="checkForm11">
              <div class="bottom1_1">垫块厚度C(mm)</div>
              <div class="bottom1_2" v-text="formDataGJ.fCo"></div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                规定值或允许偏差(mm)
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fStandardvalue"></div>
            </div>
          </div>
          <!-- 钢筋保护层厚度判定系数 -->
          <div class="top_box top_1 top_5">
            <div class="bottom1_1">钢筋保护层厚度判定系数</div>

            <div
              class="bottom1_2"
              v-text="formDataGJ.fThicknessdecidecoefficient"
            ></div>
          </div>
          <!-- 表格 -->
          <div class="table_recordSheet">
            <!-- 左侧数据1-20 -->
            <div class="recordSheet" style="width: 50%; box-sizing: border-box">
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column label="测点编号" width="47.5">
                </el-table-column>
                <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                </el-table-column>
                <el-table-column label="保护层厚度检测值(mm)">
                  <el-table-column label="第一次检测值" width="70.75">
                  </el-table-column>
                  <el-table-column label="第二次检测值" width="70.75">
                  </el-table-column>
                  <el-table-column label="修正值" width="69.75">
                  </el-table-column>
                  <el-table-column label="平均检测值" width="70.75">
                  </el-table-column>
                </el-table-column>
                <el-table-column label="偏差值(mm)" width="69.75">
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_box"
                v-for="(v, i) in recordData"
                :key="i"
              >
                <div class="recordSheet_box_1 row1_1">
                  <el-input
                    v-model="v.fCheckpointnumber"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_2 row1_2">
                  <el-input
                    v-model="v.fDiameter"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_3">
                  <el-input
                    v-model="v.fFirstcheckvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_4">
                  <el-input
                    v-model="v.fSecondcheckvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_2 row1_5">
                  <el-input
                    v-model="v.fCc"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_6">
                  <el-input
                    v-model="v.fAvgvalue"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_4 row1_7" style="border: none">
                  <el-input
                    v-model="v.fSdvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
              </div>
            </div>
            <!-- 右侧数据21-40 -->
            <div
              class="recordSheet"
              style="
                width: 50%;
                box-sizing: border-box;
                border-right: 1px solid #ccc;
              "
            >
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column label="测点编号" width="47.5">
                </el-table-column>
                <el-table-column label="钢筋公称直径 (mm)" width="69.75">
                </el-table-column>

                <el-table-column label="保护层厚度检测值(mm)">
                  <el-table-column label="第一次检测值" width="70.75">
                  </el-table-column>
                  <el-table-column label="第二次检测值" width="70.75">
                  </el-table-column>
                  <el-table-column label="修正值" width="69.75">
                  </el-table-column>
                  <el-table-column label="平均检测值" width="70.75">
                  </el-table-column>
                </el-table-column>
                <el-table-column label="偏差值(mm)" width="69.75">
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_box"
                v-for="(v, i) in recordData1"
                :key="i"
              >
                <div class="recordSheet_box_1 row1_1">
                  <el-input
                    v-model="v.fCheckpointnumber"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_2 row1_2">
                  <el-input
                    v-model="v.fDiameter"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_3">
                  <el-input
                    v-model="v.fFirstcheckvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_4">
                  <el-input
                    v-model="v.fSecondcheckvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_2 row1_5">
                  <el-input
                    v-model="v.fCc"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_3 row1_6">
                  <el-input
                    v-model="v.fAvgvalue"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_4 row1_7" style="border: none">
                  <el-input
                    v-model="v.fSdvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
              </div>
            </div>
          </div>
          <!--底部 第一行 -->
          <div class="bottom_box">
            <div class="bottom1_1">保护层厚度检测点数</div>
            <div class="bottom1_2" v-text="formDataGJ.fCheckpointcount"></div>
            <div class="bottom1_3" style="border-left: #ccc 1px solid">
              合格点数
            </div>
            <div
              class="bottom1_4"
              v-text="formDataGJ.fCheckpointqualifiedcount"
            ></div>
            <div class="bottom1_5">合格率(%)</div>
            <div
              class="bottom1_6"
              v-text="formDataGJ.fCheckpointqualifiedrate"
            ></div>
          </div>
          <!--底部 第二行 -->
          <div class="bottom_box">
            <div class="bottom1_1">保护层厚度平均值<span>D</span>n(mm)</div>
            <div
              class="bottom1_2"
              v-text="formDataGJ.fCheckpointavgthickness"
            ></div>
            <div class="bottom1_3" style="border-left: #ccc 1px solid">
              标准偏差(mm)
            </div>
            <div class="bottom1_4" v-text="formDataGJ.fSd"></div>
            <div class="bottom1_5">保护层厚度特征值(mm)</div>
            <div class="bottom1_6" v-text="formDataGJ.fDne"></div>
          </div>
          <!-- 检测部位示意图 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">检测部位示意图</div>
            <div class="bottom1_2">
              <el-input v-show="false" v-model="formDataGJ.fDne"></el-input>
              <div
                ref="fPhotofilelist"
                style="
                  height: 25px;
                  line-height: 25px;
                  width: 100%;
                  display: flex;
                  border-radius: 5px;
                  margin: 8px 0 2px 0;
                "
              >
                <div
                  v-for="(v, i) in fPhotofilelist"
                  :key="i"
                  style="margin: 2px 3px; height: 87%"
                  @click="openPdfs(v)"
                >
                  <img
                    style="max-width: 100%; max-height: 100%"
                    src="@/assets/img/pdf.png"
                  />
                </div>
              </div>

              <!-- <el-button v-show="!dis" type="info" icon="el-icon-search" size="small" @click="operation()"
                                                            style="margin: 8px 5px 2px 5px">操作</el-button> -->
            </div>
          </div>
          <!-- 附加声明 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">附加声明</div>
            <div class="bottom1_2" v-text="formDataGJ.fAddcomments"></div>
          </div>
        </div>

        <!-- 钢筋保护层厚度试验检测报告 -->
        <div
          v-if="activeIndex == 2"
          class="dialogBody common reportSheet"
          :style="{ height: dialogHeights }"
        >
          <header>
            钢筋保护层厚度试验检测报告
            <div class="printTable">
              <el-button
                type="primary"
                icon="el-icon-printer"
                size="small"
                @click="Print(4)"
                >打印表格
              </el-button>
            </div>
          </header>
          <!-- 检测类型 -->
          <div
            class="top_box top_1"
            style="border-bottom: 1px solid #ccc"
            id="checkForm1"
            v-show="false"
          ></div>
          <!-- 头部 -->
          <div class="title">
            <div class="title_Name">
              <div class="title_input_text">检测单位名称(专用章):</div>
              <div
                class="title_input_con"
                v-text="formDataGJ.fCheckcompanyfullname"
              ></div>
            </div>
            <div class="title_input">
              <div class="title_input_text">报告编号：</div>
              <div
                class="title_input_con"
                v-text="formDataGJ.fReportnumber"
              ></div>
            </div>
          </div>
          <!-- 施工/委托单位 -->
          <div class="top_box top_1 top_2">
            <div class="top_4">
              <div class="bottom1_1" style="line-height: 40px !important">
                施工/委托单位
              </div>

              <div class="bottom1_2" v-text="formDataGJ.fClientfullname"></div>
            </div>
            <div class="top_4">
              <div
                class="bottom1_1"
                style="
                  border-left: 1px solid #ccc;
                  line-height: 40px !important;
                "
              >
                工程名称
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fProjectfullname"></div>
            </div>
          </div>
          <!-- 工程部位/用途 -->
          <div class="top_box top_1">
            <div class="bottom1_1">工程部位/用途</div>
            <div class="bottom1_2" v-text="formDataGJ.fProjectpartandapp"></div>
          </div>
          <!-- 样品信息 -->
          <div class="top_box top_1">
            <div class="bottom1_1">样品信息</div>
            <div class="bottom1_2" v-text="sample"></div>
          </div>
          <!-- 检测依据 -->
          <div class="top_box top_1">
            <div class="top_4">
              <div class="bottom1_1">检测依据</div>
              <div class="bottom1_2" v-text="formDataGJ.fCheckreference"></div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                判定依据
              </div>

              <div class="bottom1_2" v-text="formDataGJ.fDecidereference"></div>
            </div>
          </div>
          <!-- 主要仪器设备名称及编号 -->
          <div class="top_box top_1 top_2">
            <div class="bottom1_1">主要仪器设备<br />名称及编号</div>
            <div
              class="bottom1_2"
              v-text="formDataGJ.fMajorequipnameandnumber"
            ></div>
          </div>
          <!-- 龄期 -->
          <div class="top_box top_1">
            <div class="top_4">
              <div class="bottom1_1">龄期(d)</div>
              <div class="bottom1_2" v-text="formDataGJ.fAge"></div>
            </div>
            <div class="top_4">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                设计强度等级
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fDesignintensity"></div>
            </div>
          </div>
          <!-- 构件名称 -->
          <div class="top_box top_1 box2">
            <div class="top_4 top_3">
              <div class="bottom1_1">构件名称</div>
              <div class="bottom1_2" v-text="formDataGJ.fComponentname"></div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                钢筋保护层厚度设计值Dnd(mm)
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fDnd"></div>
            </div>
          </div>
          <!-- 垫块厚度C -->
          <div class="top_box top_1 box2">
            <div class="top_4 top_3">
              <div class="bottom1_1">垫块厚度C(mm)</div>
              <div class="bottom1_2" v-text="formDataGJ.fCo"></div>
            </div>
            <div class="top_4 top_3">
              <div class="bottom1_1" style="border-left: 1px solid #ccc">
                规定值或允许偏差(mm)
              </div>
              <div class="bottom1_2" v-text="formDataGJ.fStandardvalue"></div>
            </div>
          </div>
          <!-- 表格 -->
          <div class="table_recordSheet table_report">
            <!-- 左侧数据1-20 -->
            <div class="recordSheet" style="width: 50%; box-sizing: border-box">
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column prop="num" label="测点编号" width="93">
                </el-table-column>
                <el-table-column label="钢筋公称直径 (mm)" width="93">
                </el-table-column>
                <el-table-column
                  label="保护层厚度检测值 (mm)"
                  width="92"
                  style="padding: 0"
                >
                </el-table-column>
                <el-table-column label="偏差值 (mm)" width="93">
                </el-table-column>
                <el-table-column
                  label="结果判定 "
                  width="93"
                  class-name="table_end"
                >
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_box"
                v-for="(v, i) in recordData"
                :key="i"
                style="border-right: none"
              >
                <div class="recordSheet_box_1 row1_1">
                  <el-input
                    v-model="v.fCheckpointnumber"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_2">
                  <el-input
                    v-model="v.fDiameter"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_3">
                  <el-input
                    v-model="v.fAvgvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_4">
                  <el-input
                    v-model="v.fSdvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_5" style="border: none">
                  <el-input
                    v-model="v.fResultdecide"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
              </div>
            </div>
            <!-- 右侧数据21-40 -->
            <div
              class="recordSheet"
              style="
                width: 50%;
                box-sizing: border-box;
                border-right: 1px solid #ccc;
              "
            >
              <el-table style="width: 100%; box-sizing: border-box">
                <el-table-column prop="num" label="测点编号" width="93">
                </el-table-column>
                <el-table-column
                  prop="diameter"
                  label="钢筋公称直径 (mm)"
                  width="92"
                >
                </el-table-column>
                <el-table-column
                  prop="diameter"
                  label="保护层厚度检测值 (mm)"
                  width="92"
                >
                </el-table-column>
                <el-table-column prop="diameter" label="偏差值 (mm)" width="93">
                </el-table-column>
                <el-table-column prop="diameter" label="结果判定 " width="93">
                </el-table-column>
              </el-table>
              <div
                class="recordSheet_box"
                v-for="(v, i) in recordData1"
                :key="i"
                style="border-right: none"
              >
                <div class="recordSheet_box_1 row1_1">
                  <el-input
                    v-model="v.fCheckpointnumber"
                    placeholder="/"
                    disabled
                    class="center_text"
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_2">
                  <el-input
                    v-model="v.fDiameter"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_3">
                  <el-input
                    v-model="v.fAvgvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_4">
                  <el-input
                    v-model="v.fSdvalue"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
                <div class="recordSheet_box_1 row1_5" style="border: none">
                  <el-input
                    v-model="v.fResultdecide"
                    placeholder="/"
                    class="center_text"
                    disabled
                  ></el-input>
                </div>
              </div>
            </div>
          </div>
          <!--底部 第一行 -->
          <div
            class="bottom_box"
            style="margin-top: 15px; border-top: 1px solid #ccc"
          >
            <div class="bottom1_1">保护层厚度检测点数</div>
            <div class="bottom1_2" v-text="formDataGJ.fCheckpointcount"></div>
            <div class="bottom1_3" style="border-left: #ccc 1px solid">
              合格点数
            </div>
            <div
              class="bottom1_4"
              v-text="formDataGJ.fCheckpointqualifiedcount"
            ></div>
            <div class="bottom1_5">合格率(%)</div>
            <div
              class="bottom1_6"
              v-text="formDataGJ.fCheckpointqualifiedrate"
            ></div>
          </div>
          <!--底部 第二行 -->
          <div class="bottom_box">
            <div class="bottom1_1">保护层厚度平均值<span>D</span>n(mm)</div>
            <div
              class="bottom1_2"
              v-text="formDataGJ.fCheckpointavgthickness"
            ></div>
            <div class="bottom1_3" style="border-left: #ccc 1px solid">
              标准偏差(mm)
            </div>
            <div class="bottom1_4" v-text="formDataGJ.fSd"></div>
            <div class="bottom1_5">保护层厚度特征值(mm)</div>
            <div class="bottom1_6" v-text="formDataGJ.fDne"></div>
          </div>
          <!-- 保护层厚度特征值与设计值的比值Dne/Dnd -->
          <div
            class="top_box top_1 top_5 box2"
            style="border-bottom: 1px solid #ccc; border-top: none"
          >
            <div class="bottom1_1">保护层厚度特征值与设计值的比值Dne/Dnd</div>

            <div class="bottom1_2" v-text="formDataGJ.fRatioofdneanddnd"></div>
          </div>
          <!-- 检测结论 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">检测结论</div>

            <div class="bottom1_2">
              <div
                v-text="formDataGJ.fCheckresult"
                style="line-height: 20px"
              ></div>
            </div>
          </div>
          <!-- 附加声明 -->
          <div class="bottom_box box2">
            <div class="bottom1_1">附加声明</div>
            <div class="bottom1_2" v-text="formDataGJ.fAddcomments"></div>
          </div>
        </div>
      </el-dialog>
    </div>
    <!-- 钢筋 -->
    <div class="Control-2">
      <el-dialog :title="fFileName" :visible.sync="dialogPdf" v-dialogDrag>
        <div :style="{ height: dialogHeights }">
          <iframe
            :src="pdfUrl"
            width="100%"
            height="100%"
            frameborder="0"
          ></iframe>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import {
  getUserCompanyTreeList,
  getCheckProjectFirstList,
  getConcreteChecksampleByFid, //混凝土回弹窗口
  getConcreteChecksampleProjectList, // 混凝土回弹业务监管-根据标段工程标识查询列表页
  getProtectioncourseListByProjectId, //钢筋列表页
  getProtectioncourseByFid,
  saveConcreteChecksample,
  addProtectioncourse, //钢筋计算修改
} from "@/api/request.js";
import tree from "@/components/public/common-trees";

export default {
  data() {
    return {
      lr_view: null,
      name: "ProjectPage",
      navigatepageNums: null,
      highlightBd: true,
      // 钢筋
      recordData: [],
      recordData1: [],
      dialogTableVisibleSee: false,
      loadingDialogSee: false,
      formDataGJ: {},
      // 钢筋

      dialogText: "",
      isHave: "",
      F_Note: "",
      isGJHave: "",
      F_ProtectionNote: "",
      widthTab: "55",
      widthTab1: "77",
      sample: "",
      fEquipmentname: "", //已选主要仪器设备
      equipmentDetailId: "",
      showName: "未选择公司",
      dialogHeight: "",
      dialogHeights: "",
      dialogHeightsa: "",
      activeIndexs: "1",
      checked: false, //查看下级
      activeIndex: "1",
      tableWidth: "35",
      tableWidth1: "55",
      fId: null, //当前数据fId
      projectName: null, //项目名称
      loading: false,
      CheckList: [], //检测记录
      tableData5: [],
      fIds: null,
      fPhotofilelist: [], //检测记录表文件集合
      fSourcefilelist: [], //强度检测报告文件集合
      dialogTableVisible: false,
      dialogTableVisibled: false,
      pdfUrl: "",
      loadingDialog1: false,
      dialogCheckVisible: false,
      dialogCheckVisibleGJ: false,
      loadingCheckDialog: false,
      loadingCheckDialogGJ: false,
      dialogFormVisible: false,
      currentRow: "",
      formData: {},
      formLabelWidth: "70px",
      formLabelHeight: "30px",
      treeData: [],
      tableDatas: [],
      tableData: [],
      defaultProps: {
        children: "children",
        label: "fShortname",
      },
      dialogVisible: false,
      companyId: null,
      loadingDialog: false,
      treeText: {
        companyId: null,
        userId: null,
      },
      treelength: false,
      dialogPdf: false,
      // pdfUrl: "",
      fFileName: "", // 上传附件
      checkData: [],
      loadings:false
    };
  },
  components: {
    tree,
  },
  created() {
    this.concretetypeList = JSON.parse(
      sessionStorage.getItem("monitorBack-concretetypeList")
    ); //泵送混凝土
    this.concretetypeunList = JSON.parse(
      sessionStorage.getItem("monitorBack-concretetypeunList")
    ); //非泵送混凝土
  },
  mounted() {
    this.userInfo = JSON.parse(sessionStorage.getItem("monitorBack-userInfo"));
    if (JSON.parse(sessionStorage.getItem("monitorBack-currencyList"))) {
      var id = JSON.parse(sessionStorage.getItem("monitorBack-currencyList"));
      this.checkData = [id.fCompanyid];
    }
    this.getHeight();
    this.getTree();
    this.btnRole(this.name);
  },
  methods: {
    btnRole(name) {
      var btnList = [];
      var ModuleList = JSON.parse(sessionStorage.getItem("monitorBack-ModuleList"));
      if (ModuleList.length > 0) {
        ModuleList.map((item) => {
          if (item.fEncode == name) {
            btnList = item.modulebuttonList;
          }
        });
        var btnStr = [];
        btnList.map((item) => {
          btnStr.push(item.fEncode);
        });

        this.lr_view = btnStr.includes("lr_view");
        // this.lr_record = btnStr.includes("lr_record");

        // this.lr_report = btnStr.includes("lr_report");
      } else {
        this.lr_view = true;
        // this.lr_record = true;
        // this.lr_report = true;
      }
    },
    // 保留文件，点击查看
    openPdfs(v) {
      this.dialogPdf = true;
      this.pdfUrl = v.url;
      this.fFileName = v.fFileName;
    }, // 移除
    Print(num) {
      if (num == 1) {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getExcelByConcreteSample.do?fId=" +
            this.equipmentDetailId
        );
      } else if (num == 2) {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getExcelByConcreteSampleCode.do?fId=" +
            this.equipmentDetailId
        );
      } else if (num == 3) {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getProtectioncourseRecordPDF.do?fId=" +
            this.equipmentDetailId
        );
      } else if (num == 4) {
        window.open(
          "http://1.14.19.236:8054/concreteScreen/App/upload/getProtectioncourseReportPDF.do?fId=" +
            this.equipmentDetailId
        );
      }
    },
    // 钢筋
    openDialog2(row) {
      this.isGJHave = row.isGJHave;
      this.F_ProtectionNote = row.F_ProtectionNote;
      this.getCheckListGJ(row.F_EnCode);
    },
    getCheckListGJ(id) {
      if (this.isGJHave > 0 && this.F_ProtectionNote != "") {
        this.dialogCheckVisibleGJ = true;
        this.loadingCheckDialogGJ = true;
        getProtectioncourseListByProjectId({ fProjectpartid: id }).then(
          (res) => {
            if (res.errcode == 0) {
              this.loadingCheckDialogGJ = false;
              this.tableData = res.data.protectioncourseList;
            } else {
              this.$message.error(res.msg);
              this.loadingCheckDialogGJ = false;
            }
          }
        );
      } else {
        this.$message.error("请选择可查看数据");
      }
    },

    // 点击行信息表/报告表
    details(row) {
      this.activeIndex = "1";
      this.equipmentDetailId = row.fId;

      if (row.fId != null && row.fId != "") {
        this.recordData = [];
        this.recordData1 = [];
        this.dialogTableVisibleSee = true;
        this.loadingDialogSee = true;
        getProtectioncourseByFid({ fId: row.fId })
          .then((res) => {
            if (res.errcode == 0) {
              var that = this;
              that.loadingDialogSee = false;
              that.formDataGJ = res.data.checkProtectioncourse;
              that.fPhotofilelist = res.data.checkpartimage;
              for (
                let index = 0;
                index < that.formDataGJ.checkPointList.length;
                index++
              ) {
                const element = that.formDataGJ.checkPointList[index];
                if (index < 20) {
                  that.recordData.push(element);
                } else {
                  that.recordData1.push(element);
                }
              }
              that.sample =
                "样品名称:" +
                that.formDataGJ.fSamplename +
                "; " +
                "样品编号:" +
                that.formDataGJ.fSamplenumber +
                "; " +
                "样品状态:" +
                that.formDataGJ.fSampledescription +
                "; ";

              if (
                that.formDataGJ.fDiameter != "" &&
                that.formDataGJ.fCc != "" &&
                that.formDataGJ.fDnd != "" &&
                that.formDataGJ.fCo != "" &&
                that.formDataGJ.fStandardvalue != ""
              ) {
                that.inputCheckpointnumber();
              }
            } else {
              this.$message.error(res.msg);
            }
          })
          .catch(() => {
            return false;
          });
      } else {
        return this.$message.error("请先选择需查看的数据");
      }
    },
    // 钢筋计算
    inputCheckpointnumber() {
      // 钢筋工称直径和修正值带入
      for (
        let index = 0;
        index < this.formDataGJ.checkPointList.length;
        index++
      ) {
        const element = this.formDataGJ.checkPointList[index];
        if (
          element.fSecondcheckvalue != "" &&
          element.fSecondcheckvalue != null &&
          element.fFirstcheckvalue != null &&
          element.fFirstcheckvalue != ""
        ) {
          element.fDiameter = this.formDataGJ.fDiameter;
          element.fCc = this.formDataGJ.fCc;
          //  平均检测值
          if (
            Number(element.fFirstcheckvalue - element.fSecondcheckvalue) > 1 ||
            Number(element.fSecondcheckvalue - element.fFirstcheckvalue) > 1
          ) {
            element.fAvgvalue = "无效";
            element.fSdvalue = "无效";
          } else {
            var Avgvalue;
            Avgvalue =
              (Number(element.fSecondcheckvalue) +
                Number(element.fFirstcheckvalue) +
                2 * Number(element.fCc) -
                2 * Number(this.formDataGJ.fCo)) /
              2;

            if (parseInt(Avgvalue) === parseFloat(Avgvalue)) {
              element.fAvgvalue = Avgvalue.toFixed(0);
            } else {
              var arr = Avgvalue.toString().split(".");
              if (arr[1].length > 1) {
                element.fAvgvalue = arr[0] - 0 + 1;
              } else {
                if ((arr[0] - 0) % 2 == 0) {
                  element.fAvgvalue = arr[0] - 0;
                } else {
                  element.fAvgvalue = arr[0] - 0 + 1;
                }
              }
            }

            element.fAvgvalue = element.fAvgvalue + "";

            //偏差值
            element.fSdvalue = Number(element.fAvgvalue - this.formDataGJ.fDnd)
              .toFixed(0)
              .toString();
          }
        } else {
          element.fDiameter = "";
          element.fAvgvalue = "";
          element.fSdvalue = "";
          element.fResultdecide = "";
          element.fCc = "";
        }
      }

      this.calculation();
    },

    calculation() {
      let CheckpointcountNum = 0; //  检测点数
      let StandardvaluNum = 0; //合格点数
      let StandardvaluNums = 0; //有效点数
      let StandardvaluNumAllin = 0; //所有合格点数平均值总和
      let fSdvaluNum = 0; //偏差平方总和
      let standard = 0; //标准差
      let Checkpointavgthickness = 0; //保护层厚度平均值
      let features = 0; //保护层厚度特征值

      for (
        let index = 0;
        index < this.formDataGJ.checkPointList.length;
        index++
      ) {
        const element = this.formDataGJ.checkPointList[index];
        // 检测点数
        if (element.fFirstcheckvalue != "" || element.fSecondcheckvalue != "") {
          CheckpointcountNum++;
          // 判定系数
          if (CheckpointcountNum >= 25) {
            this.formDataGJ.fThicknessdecidecoefficient = "1.595";
          } else if (24 >= CheckpointcountNum && CheckpointcountNum >= 16) {
            this.formDataGJ.fThicknessdecidecoefficient = "1.645";
          } else if (15 >= CheckpointcountNum && CheckpointcountNum >= 10) {
            this.formDataGJ.fThicknessdecidecoefficient = "1.695";
          }
        }

        // 合格点数
        if (element.fSdvalue != "无效" && element.fSdvalue != "") {
          var StandardvaluArr = this.formDataGJ.fStandardvalue.split(",");
          if (
            Number(StandardvaluArr[0]) <= Number(element.fSdvalue) &&
            Number(element.fSdvalue) <= Number(StandardvaluArr[1])
          ) {
            element.fResultdecide = "合格";
            StandardvaluNum++; //合格点数
          }
        } else {
          if (
            element.fFirstcheckvalue != "" ||
            element.fSecondcheckvalue != ""
          ) {
            element.fResultdecide = "不合格";
          }
        }

        this.formDataGJ.fCheckpointcount = CheckpointcountNum.toString(); //检测点数
        this.formDataGJ.fCheckpointqualifiedcount = StandardvaluNum.toString(); //合格点数
        //有效点数
        if (element.fAvgvalue != "无效" && element.fAvgvalue != "") {
          StandardvaluNums++; //有效点数
          StandardvaluNumAllin += Number(element.fAvgvalue); //所有有效点数平均值总和
        }
      }

      //保护层厚度平均值
      if (StandardvaluNums == 0) {
        this.formDataGJ.fCheckpointavgthickness = "0";
      } else {
        Checkpointavgthickness = (
          StandardvaluNumAllin / StandardvaluNums
        ).toFixed(1);
        this.formDataGJ.fCheckpointavgthickness =
          Checkpointavgthickness.toString();
      }
      //  标准差
      if (StandardvaluNums > 1) {
        for (
          let index = 0;
          index < this.formDataGJ.checkPointList.length;
          index++
        ) {
          const element = this.formDataGJ.checkPointList[index];
          // 标准差分子平方和
          if (element.fAvgvalue != "无效" && element.fAvgvalue != "") {
            fSdvaluNum += Math.pow(
              Number(element.fAvgvalue - Checkpointavgthickness),
              2
            ); //偏差平方总和
          }
        }
        standard = Math.sqrt(fSdvaluNum / (StandardvaluNums - 1)).toFixed(1);
        this.formDataGJ.fSd = standard.toString();
      } else {
        this.formDataGJ.fSd = "0";
      }
      // 保护层厚度特征值
      if (CheckpointcountNum >= 10) {
        features = (
          Checkpointavgthickness -
          standard * Number(this.formDataGJ.fThicknessdecidecoefficient)
        ).toFixed(1);
        this.formDataGJ.fDne = features.toString();
      } else {
        this.formDataGJ.fDne = "0";
      }

      //保护层厚度特征值与设计值的比值Dne/Dnd
      this.formDataGJ.fRatioofdneanddnd = (
        features / Number(this.formDataGJ.fDnd)
      )
        .toFixed(1)
        .toString();

      // 合格率
      if (StandardvaluNum != 0) {
        this.formDataGJ.fCheckpointqualifiedrate = (
          (Number(this.formDataGJ.fCheckpointqualifiedcount) /
            Number(this.formDataGJ.fCheckpointcount)) *
          100
        ).toFixed(1);
      } else {
        this.formDataGJ.fCheckpointqualifiedrate = "0";
      }
      if (this.formDataGJ.fModifydate == null) {
        this.addProtectioncourseFun();
      }
    },
    addProtectioncourseFun() {
      this.addData.checkProtectioncourse.checkPointList =
        this.formDataGJ.checkPointList; //表格

      this.addData.checkProtectioncourse.fThicknessdecidecoefficient =
        this.formDataGJ.fThicknessdecidecoefficient; //判定系数

      this.addData.checkProtectioncourse.fCheckpointcount =
        this.formDataGJ.fCheckpointcount; //检测点数

      this.addData.checkProtectioncourse.fCheckpointqualifiedcount =
        this.formDataGJ.fCheckpointqualifiedcount; //合格点数

      this.addData.checkProtectioncourse.fCheckpointqualifiedrate =
        this.formDataGJ.fCheckpointqualifiedrate; //合格率

      this.addData.checkProtectioncourse.fCheckpointavgthickness =
        this.formDataGJ.fCheckpointavgthickness; //保护层厚度平均值

      this.addData.checkProtectioncourse.fSd = this.formDataGJ.fSd; //标准差

      this.addData.checkProtectioncourse.fDne = this.formDataGJ.fDne; // 保护层厚度特征值

      this.addData.checkProtectioncourse.fRatioofdneanddnd =
        this.formDataGJ.fRatioofdneanddnd; //保护层厚度特征值与设计值的比值Dne/Dnd
      this.addData.checkProtectioncourse.isSubmit = "1";
      addProtectioncourse(this.addData)
        .then((res) => {
          if (res.errcode == 0) {
            console.log("查看页面修改成功");
          } else {
            console.log("查看页面修改失败", res.msg);
            this.loading = false;
          }
        })
        .catch(() => {
          console.log("修改接口报错");
          this.loading = false;
        });
    },
    // 钢筋计算
    // 钢筋

    handleSelect(key) {
      this.activeIndex = key;
    },
    edit() {
      this.activeIndex = "1";
      if (this.equipmentDetailId != null && this.equipmentDetailId != "") {
        this.dialogText = "查看";
        this.dialogTableVisible = true;
        this.loadingDialog = true;

        getConcreteChecksampleByFid({ fId: this.equipmentDetailId })
          .then((res) => {
            if (res.errcode == 0) {
              var that = this;
              that.loadingDialog = false;
              that.formData = res.data.lrCheckConcretesample;

              // if (this.getList.modelType == 0) {
              //   this.disabledText = false
              // } else if (this.getList.modelType == 1) {
              //   this.disabledText = true
              // }

              that.sample =
                "样品名称:" +
                that.formData.fSamplename +
                "; " +
                "样品编号:" +
                that.formData.fSamplingno +
                "; " +
                "样品状态:" +
                that.formData.fSamplespecs +
                "; ";
              // this.formDataSample.sampleName = this.formData.fSamplename;//样品名称

              // that.formDataSample.sampleNum = this.formData.fSamplingno;
              // that.formDataSample.sampleStatus =
              //   that.formData.fSamplespecs;
              // var arr = that.formDataSample.sampleStatus.split(",");
              // that.checkedCities = arr;

              // var text = that.formData.fEquipmentname.split(',')
              // this.fEquipmentname=text

              // var idArr = this.formData.fEquipmentid.split(',')
              // var idData = []
              // idArr.map(item => {
              //   this.tableData1.map(it => {
              //     if (item == it.fId) {
              //       idData.push(it)
              //     }
              //   })
              // })
              this.fEquipmentname = this.formData.fEquipmentname;
              // this.fEquipmentname
              var data =
                res.data.lrCheckConcretesample.checkConcretesampleitems;
              var table =
                res.data.lrCheckConcretesample.checkConcretesampleresult;
              var totalData = [];
              var checkname = [
                "fParam1",
                "fParam2",
                "fParam3",
                "fParam4",
                "fParam5",
                "fParam6",
                "fParam7",
                "fParam8",
                "fParam9",
                "fParam10",
                "fParam11",
                "fParam12",
                "fParam13",
                "fParam14",
                "fParam15",
                "fParam16",
              ];
              var alreadyData = []; //已填的测区
              for (var i = 0; i < data.length; i++) {
                for (var j = 0; j < checkname.length; j++) {
                  totalData.push(data[i].fId);
                  if (data[i][checkname[j]] != "") {
                    alreadyData.push(data[i].fId);
                  }
                }
              }
              var totalId = []; //所有测区Id
              data.map((item) => {
                totalId.push(item.fId);
              });
              var totalIdIndex = []; //已填测区 index
              totalId.map((item, index) => {
                alreadyData.map((i) => {
                  if (item == i) {
                    totalIdIndex.push(index);
                  }
                });
              });
              let newData = alreadyData.filter(
                (item, index) => alreadyData.indexOf(item) === index
              );
              this.formData.fTestnum = newData.length; // 实测数量(测区)
              // this.selecttTotalIdIndex = totalIdIndex; //已填测区 index
              var blankData = [];
              var rowData = []; //所有数据，不填补零
              var realArr = []; //每行真实数据
              for (var c = 0; c < data.length; c++) {
                var rowDeatil = [];
                var realData = []; //真实数据
                for (var h = 0; h < checkname.length; h++) {
                  if (data[c][checkname[h]] != "") {
                    rowDeatil.push(data[c][checkname[h]]);
                    realData.push(data[c][checkname[h]]);
                  } else {
                    blankData.push(c);
                    rowDeatil.push("0");
                    // realData.push('0')
                  }
                }

                rowData.push({
                  data: rowDeatil,
                });
                realArr.push({
                  data: realData,
                });
              }
              // 10个数，去掉三个最大数和三个最小数
              var drawData = []; // 10个数，去掉三个最大数和三个最小数
              for (var s = 0; s < realArr.length; s++) {
                // // 数组对象排序
                if (realArr[s].data.length == 16) {
                  var sortData = realArr[s].data.sort(function (a, b) {
                    return a - b;
                  });
                  drawData.push({
                    data: sortData.slice(3, 13),
                  });
                } else {
                  drawData.push({
                    data: realArr[s].data,
                  });
                }
              }
              var angleNum = []; // 四舍五入
              var anglerealNum = []; //实测平均回弹值Rm数组
              var cgf = [];
              var hh = [];
              drawData.map((item) => {
                var len = item.data.length;
                var sum = 0;
                for (var i = 0; i < len; i++) {
                  var num = item.data[i] - 0;
                  sum += num;
                }
                angleNum.push(sum / len);
                anglerealNum.push(sum / len);
                cgf.push((sum / len).toFixed(1));
                hh.push((sum / len).toFixed(1));
              });
              anglerealNum.map((items, index) => {
                var num = "fResult" + (index + 1);
                if (!isNaN(items)) {
                  console.log(555, table[1][num], this.formData.fSurface);

                  this.formData.checkConcretesampleresult[0][num] =
                    items.toFixed(1);

                  if (table[1][num] == "" && this.formData.fSurface == "侧面") {
                    table[1][num] = "0°";
                    data[index].fDetectionangle = "0°";
                  } else if (
                    table[1][num] == "" &&
                    (this.formData.fSurface == "表面" ||
                      this.formData.fSurface == "底面")
                  ) {
                    table[1][num] = "90°";
                    data[index].fDetectionangle = "90°";
                  }
                } else {
                  this.formData.checkConcretesampleresult[0][num] = "";
                  this.formData.checkConcretesampleresult[1][num] = "";
                  this.formData.checkConcretesampleresult[2][num] = "";
                  this.formData.checkConcretesampleresult[3][num] = "";
                  this.formData.checkConcretesampleresult[4][num] = "";
                  this.formData.checkConcretesampleresult[5][num] = "";
                  this.formData.checkConcretesampleresult[6][num] = "";
                  this.formData.checkConcretesampleresult[7][num] = "";

                  table[1][num] = "";
                  data[index].fDetectionangle = "";
                }
              });
              this.formData.checkConcretesampleresult = table;
              this.RmData = anglerealNum; //实测平均回弹值Rm

              this.calculationData(
                this.RmData,
                this.formData.checkConcretesampleresult
              );
            } else {
              this.$message.error(res.msg);
            }
          })
          .catch(() => {
            return false;
          });
      } else {
        return this.$message.error("请先选择需要编辑的数据");
      }
    },
    calculationData(RmData, data) {
      var numData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
      if (this.formData.fDirection == "非水平方向") {
        // 二、检测角度回弹值修正值
        var angleData = []; //所有角度，未填按'''
        numData.map((item, index) => {
          var num = "fResult" + (index + 1);

          angleData.push(data[1][num]);
        });

        // 遍历angleData,得到对应index
        var angleNumBer = [];
        for (var i = 0; i < angleData.length; i++) {
          if (angleData[i] == "90°") {
            angleNumBer.push("0");
          } else if (angleData[i] == "60°") {
            angleNumBer.push("1");
          } else if (angleData[i] == "45°") {
            angleNumBer.push("2");
          } else if (angleData[i] == "30°") {
            angleNumBer.push("3");
          } else if (angleData[i] == "-30°") {
            angleNumBer.push("4");
          } else if (angleData[i] == "-45°") {
            angleNumBer.push("5");
          } else if (angleData[i] == "-60°") {
            angleNumBer.push("6");
          } else if (angleData[i] == "-90°") {
            angleNumBer.push("7");
          } else if (angleData[i] == "") {
            angleNumBer.push("");
          }
        }
        // 处理实测平均回弹值Rm值
        // 大于等于20，小于等于50
        var angleList = [];
        var dc = [];
        for (var ii = 0; ii < RmData.length; ii++) {
          if (RmData[ii] < 20) {
            dc[ii] = 20;
          } else if (RmData[i] > 50) {
            dc[ii] = 50;
          } else if (RmData[i] == "") {
            dc[ii] = "";
          } else {
            dc[ii] = RmData[ii].toFixed(0);
          }

          // 对应平均回弹值的所有检测角度
          angleList.push({
            data: this.detectionList[dc[ii]],
          });
        }

        // 根据对应的角度对应值及实测平均回弹值找检测角度回弹值修正值
        var corrected = []; //检测角度回弹值修正值

        for (var j = 0; j < angleList.length; j++) {
          var ff;
          if (angleList[j].data != undefined) {
            for (var ih = 0; ih < angleList[j].data.length; ih++) {
              ff = angleList[j].data;
            }
            corrected.push(ff[angleNumBer[j]]);
          } else {
            corrected.push("");
          }
        }
        // 将检测角度回弹值修正值插入this.formData.checkConcretesampleresult数组
        corrected.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (item != "") {
            this.formData.checkConcretesampleresult[2][num] = item;
          }
        });
        // 检测角度回弹值修正值
        // 三、检测角度修正后回弹值
        var reviseAngleNum = [];
        RmData.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (!isNaN(item)) {
            reviseAngleNum.push(item - 0 + (corrected[i] - 0));
            this.formData.checkConcretesampleresult[3][num] = (
              item -
              0 +
              (corrected[i] - 0)
            ).toFixed(1);
          } else {
            reviseAngleNum.push("");
          }
        });

        // 检测角度修正后回弹值
        //  四、浇筑面回弹值修正值
        var PouringSurfaceFalg;
        if (this.formData.fSurface == "表面") {
          PouringSurfaceFalg = 0;
        } else {
          PouringSurfaceFalg = 1;
        }
        var reviseAngleNums = [];
        var PouringSurfaceList = [];
        for (var iv = 0; iv < reviseAngleNum.length; iv++) {
          if (reviseAngleNum[iv] != "") {
            if (reviseAngleNum[iv] < 20) {
              reviseAngleNums[iv] = 20;
            } else if (reviseAngleNum[iv] > 50) {
              reviseAngleNums[iv] = 50;
            } else {
              reviseAngleNums[iv] = (reviseAngleNum[iv] - 0).toFixed(0);
            }
          } else {
            reviseAngleNums[iv] = "";
          }
          // 对应检测角度修正后回弹值的浇筑面回弹值修正值
          PouringSurfaceList.push({
            data: this.surfaceList[reviseAngleNums[iv]],
          });
        }

        var PouringSurface = []; //检测角度回弹值修正值
        for (var jj = 0; jj < PouringSurfaceList.length; jj++) {
          var ll;
          if (PouringSurfaceList[jj].data != undefined) {
            for (var iu = 0; iu < PouringSurfaceList[jj].data.length; iu++) {
              ll = PouringSurfaceList[jj].data;
            }
            PouringSurface.push(ll[PouringSurfaceFalg]);
          } else {
            PouringSurface.push("");
          }
        }
        // 将浇筑面回弹值修正值插入this.formData.checkConcretesampleresult数组
        PouringSurface.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (item != "") {
            this.formData.checkConcretesampleresult[4][num] = item;
          }
        });
        // 浇筑面回弹值修正值
        // 五、修正后回弹平均值
        var modifiedMean = [];
        reviseAngleNum.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (item != "") {
            modifiedMean.push((item - 0 + (PouringSurface[i] - 0)).toFixed(1));
            this.formData.checkConcretesampleresult[5][num] = (
              item -
              0 +
              (PouringSurface[i] - 0)
            ).toFixed(1);
          } else {
            this.formData.checkConcretesampleresult[5][num] = "";
            modifiedMean.push("");
          }
        });
        // 五、修正后回弹平均值
        // 浇筑面回弹值修正值
      } else if (this.formData.fDirection == "水平方向") {
        RmData.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (!isNaN(item)) {
            this.formData.checkConcretesampleresult[5][num] = item.toFixed(1);
          }
          this.formData.checkConcretesampleresult[2][num] = "";
          this.formData.checkConcretesampleresult[3][num] = "";
          this.formData.checkConcretesampleresult[4][num] = "";
        });
      }

      // 六、碳化深度dm(mm)
      // 六、碳化深度dm(mm)

      //七 强度换算值(MPa)
      var Carbonizationdepth = [];
      numData.map((item, i) => {
        var num = "fResult" + (i + 1);
        Carbonizationdepth.push(data[6][num]);
      });

      var reallCarbonizationdepth = [];
      var reallCarbonizationv = [];
      RmData.map((item, index) => {
        //获取有实测平均回弹值Rm，且碳化深度dm(mm)不为空的数据
        if (!isNaN(item)) {
          reallCarbonizationdepth.push(Carbonizationdepth[index]);
          reallCarbonizationv.push(Carbonizationdepth[index]);
        } else {
          reallCarbonizationdepth.push("");
        }
      });

      var carbonationDepthNumBer = [];
      for (var ir = 0; ir < reallCarbonizationdepth.length; ir++) {
        if (reallCarbonizationdepth[ir] == "0.0") {
          carbonationDepthNumBer.push("0");
        } else if (reallCarbonizationdepth[ir] == "0.5") {
          carbonationDepthNumBer.push("1");
        } else if (reallCarbonizationdepth[ir] == "1.0") {
          carbonationDepthNumBer.push("2");
        } else if (reallCarbonizationdepth[ir] == "1.5") {
          carbonationDepthNumBer.push("3");
        } else if (reallCarbonizationdepth[ir] == "2.0") {
          carbonationDepthNumBer.push("4");
        } else if (reallCarbonizationdepth[ir] == "2.5") {
          carbonationDepthNumBer.push("5");
        } else if (reallCarbonizationdepth[ir] == "3.0") {
          carbonationDepthNumBer.push("6");
        } else if (reallCarbonizationdepth[ir] == "3.5") {
          carbonationDepthNumBer.push("7");
        } else if (reallCarbonizationdepth[ir] == "4.0") {
          carbonationDepthNumBer.push("8");
        } else if (reallCarbonizationdepth[ir] == "4.5") {
          carbonationDepthNumBer.push("9");
        } else if (reallCarbonizationdepth[ir] == "5.0") {
          carbonationDepthNumBer.push("10");
        } else if (reallCarbonizationdepth[ir] == "5.5") {
          carbonationDepthNumBer.push("11");
        } else if (reallCarbonizationdepth[ir] == "≥6.0") {
          carbonationDepthNumBer.push("12");
        } else if (reallCarbonizationdepth[ir] == "") {
          carbonationDepthNumBer.push("");
        }
      }

      // 判断测区强度换算表，
      var AverageArr = []; //修正后回弹平均值
      numData.map((item, i) => {
        var num = "fResult" + (i + 1);
        AverageArr.push(this.formData.checkConcretesampleresult[5][num]);
      });

      var newAverageArr = []; //修正后回弹平均值(修正值自我)
      var correctedAveraged = []; //强度换算值(MPa)数组
      var correctedAveragedData = [];
      if (this.formData.fConcretetype == "泵送混凝土") {
        // 大于等于18.6，小于等于52.8
        var correctedAverageList = [];
        for (var id = 0; id < AverageArr.length; id++) {
          if (AverageArr[id] != "") {
            if (AverageArr[id] - 0 < 18.6) {
              newAverageArr[id] = 18.6;
            } else if (AverageArr[id] - 0 > 52.8) {
              newAverageArr[id] = 52.8;
            } else {
              newAverageArr[id] = (AverageArr[id] - 0).toFixed(1);
            }
          } else {
            newAverageArr[id] = "";
          }
          // 对应平均回弹值的所有换算强度
          correctedAverageList.push({
            data: this.concretetypeList[newAverageArr[id]],
          });
        }
        for (var jb = 0; jb < correctedAverageList.length; jb++) {
          var vf;
          if (correctedAverageList[jb].data != undefined) {
            for (var ik = 0; ik < correctedAverageList[jb].data.length; ik++) {
              vf = correctedAverageList[jb].data;
            }
            if (vf[carbonationDepthNumBer[jb]] != undefined) {
              correctedAveraged.push(vf[carbonationDepthNumBer[jb]]);
              correctedAveragedData.push(vf[carbonationDepthNumBer[jb]]);
            } else {
              correctedAveraged.push("");
              correctedAveragedData.push("");
            }
          } else {
            correctedAveraged.push("");
            correctedAveragedData.push("");
          }
        }
        correctedAveraged.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (item != "") {
            this.formData.checkConcretesampleresult[7][num] = item;
          }
        });

        // console.log(8888899999, this.formData.checkConcretesampleresult[7]);
      } else if (this.formData.fConcretetype == "非泵送混凝土") {
        // 大于等于20.0，小于等于50.0
        var correctedAverageLists = [];
        for (var ids = 0; ids < AverageArr.length; ids++) {
          if (AverageArr[ids] != "") {
            if (AverageArr[ids] < 20.0) {
              newAverageArr[ids] = "20.0";
            } else if (AverageArr[ids] > 50.0) {
              newAverageArr[ids] = "50.0";
            } else {
              newAverageArr[ids] = AverageArr[ids];
            }
          } else {
            newAverageArr[ids] = "";
          }
          correctedAverageLists.push({
            data: this.concretetypeunList[newAverageArr[ids]],
          });
        }

        for (var jr = 0; jr < correctedAverageLists.length; jr++) {
          var vfs;
          if (correctedAverageLists[jr].data != undefined) {
            for (var io = 0; io < correctedAverageLists[jr].data.length; io++) {
              vfs = correctedAverageLists[jr].data;
            }
            if (vfs[carbonationDepthNumBer[jr]] != undefined) {
              correctedAveraged.push(vfs[carbonationDepthNumBer[jr]]);
              correctedAveragedData.push(vfs[carbonationDepthNumBer[jr]]);
            } else {
              correctedAveraged.push("");
              correctedAveragedData.push("");
            }
          } else {
            correctedAveraged.push("");
            correctedAveragedData.push("");
          }
        }
        correctedAveraged.map((item, i) => {
          var num = "fResult" + (i + 1);
          if (item != "") {
            this.formData.checkConcretesampleresult[7][num] = item;
          }
        });
      }
      // this.formData.checkConcretesampleresult.map()
      // 强度换算值(MPa)
      // 碳化深度dm(mm)

      var correctedAveragedNum = []; //处理强度换算值
      for (var ig = 0; ig < correctedAveragedData.length; ig++) {
        // /\D/g
        var str = correctedAveragedData[ig].replace(/[^\d.]/gi, "");
        correctedAveragedNum.push(str);
      }

      var correctedAveragedNumber = 0;
      for (i = 0; i < correctedAveragedNum.length; i++) {
        var num = correctedAveragedNum[i];

        correctedAveragedNumber += num - 0;
      }

      var correctedGetData = [];
      correctedAveragedNum.map((item) => {
        if (item != "") {
          correctedGetData.push(item);
        }
      });
      var strengthConversionAverage; // 强度换算值平均值
      if (correctedGetData.length != 0) {
        strengthConversionAverage =
          correctedAveragedNumber / correctedGetData.length; // 强度换算值平均值
      } else {
        strengthConversionAverage = 0;
      }
      //  强度换算值方差
      var strengthConversionNum = 0;
      // 强度换算值减去强度换算值平均值 的平方

      for (var ie = 0; ie < correctedGetData.length; ie++) {
        if (correctedGetData[ie] != "") {
          strengthConversionNum += Math.pow(
            correctedGetData[ie] - 0 - strengthConversionAverage.toFixed(2),
            2
          );
        }
      }

      const filtered = reallCarbonizationv.filter((item) => {
        return item !== null && typeof item !== "undefined" && item !== "";
      });

      if (filtered.length != 0) {
        //碳化深度dm(mm)数组不为空时
        var strengthAveraged = 0;
        if (correctedGetData.length != 0 && correctedGetData.length != 1) {
          strengthAveraged =
            strengthConversionNum / (correctedGetData.length - 1);
        }

        var strengthAveragedNum = Math.sqrt(strengthAveraged);
        this.formData.fStandarddeviation = strengthAveragedNum.toFixed(2);
        //  强度换算值方差

        // 混凝土强度推定值(MPa)
        console.log(
          correctedGetData,
          correctedAveragedNum,
          this.formData.fTestnum
        );
        if (this.formData.fTestnum - 0 < 10) {
          // console.log(1, Math.min.apply(null, correctedAveragedNum) + "Mpa");

          // this.formData.fConcreteresult =
          //   Math.min.apply(null, correctedAveragedNum) + "Mpa"; //当构件测区少于10个时
          this.formData.fConcreteresult = correctedGetData[0];
          for (var ifn = 1; ifn < correctedGetData.length; ifn++) {
            this.formData.fConcreteresult = Math.min(
              this.formData.fConcreteresult,
              correctedGetData[ifn]
            );
          }
          this.formData.fConcreteresult = this.formData.fConcreteresult + "Mpa";
        } else if (this.formData.fTestnum - 0 >= 10) {
          //当构件测区不少于10个时
          this.formData.fConcreteresult =
            (
              strengthConversionAverage -
              this.formData.fStandarddeviation * 1.645
            ).toFixed(1) + "Mpa";
        }
        for (var ia = 0; ia < correctedGetData.length; ia++) {
          if (correctedGetData[ia] - 0 < 10.0) {
            this.formData.fConcreteresult = "<10.0Mpa"; //当构件的测区强度值中有小于10.0MPa时
          }

          // this.Testresult[0] = {
          //   fItemCode: null,
          //   fItemName:
          //     "经检测，该结构物回弹强度推定值" +
          //     this.formData.fConcreteresult +
          //     "。",
          // };

          // if (
          //   this.formData.fTestresult != "" &&
          //   this.formData.fTestresult !=
          //   "经检测，该检测结果符合（判定依据）技术要求。"&&this.formData.fTestresult==null
          // ) {
          //   this.formData.fTestresult =
          //     "经检测，该结构物回弹强度推定值" +
          //     this.formData.fConcreteresult +
          //     "。";
          // }
          if (this.formData.fTestresult == null) {
            this.formData.fTestresult =
              "经检测，该结构物回弹强度推定值" +
              this.formData.fConcreteresult +
              "。";
          } else {
            this.formData.fTestresult =
              "经检测，该检测结果符合（判定依据）技术要求。";
          }

          // 混凝土强度推定值(MPa)
        }
      }
      if (this.formData.fModifydate == null) {
        this.submitFormSample(this.formData);
      }
    },
    submitFormSample(data) {
      saveConcreteChecksample(data).then((res) => {
        if (res.errcode == 0) {
          console.log("保存成功");
        } else {
          this.$message.error(res.msg);
        }
      });
    },
    // 左侧树结构
    getTree() {
      this.treeText.companyId = this.userInfo.companyId;
      this.treeText.userId = this.userInfo.userId;
      getUserCompanyTreeList(this.treeText)
        .then((res) => {
          if (res.errcode == 0) {
            var companyTree = res.data.userCompanyTreeList;
            this.treeData = this.commonJs.tranListToTreeData(companyTree);

            if (this.treeData[0].children == undefined) {
              this.treelength = false;
            } else {
              this.treelength = true;
            }
            // this.companyId = this.treeData[0].fCompanyid;
            // this.showName = this.treeData[0].fShortname;
            if (this.checkData[0]) {
              this.showName = JSON.parse(
                sessionStorage.getItem("monitorBack-currencyList")
              ).fShortname;

              this.companyId = this.checkData[0];
            } else {
              this.showName = this.treeData[0].fShortname; //当前点击组织机构名称
              this.companyId = this.treeData[0].fCompanyid; //当前点击组织机构ID
              this.checkData[0] = this.treeData[0].fCompanyid;
            }
            // 列表
            this.getDataList(this.companyId);
            // 列表
          } else {
            this.$message.error(res.msg);
            // this.$message.error("获取组织机构失败");
            return false;
          }
        })
        .catch(() => {
          return false;
        });
    },

    tranListToTreeData1(data) {
      let result = [];
      if (!Array.isArray(data)) {
        return result;
      }
      // 清除已存在的children 重新赋值
      data.forEach((item) => {
        delete item.children;
      });

      let map = {};
      data.forEach((item) => {
        map[item.F_CompanyId] = item;
      });

      data.forEach((item) => {
        let parent = map[item.F_ParentId];
        if (parent) {
          (parent.children || (parent.children = [])).push(item);
        } else {
          result.push(item);
        }
      });

      return result;
    },
    // 获取列表数据
    getDataList(id) {
      this.loading = true;
      getCheckProjectFirstList({ companyId: id })
        .then((res) => {
          if (res.errcode == 0) {
            var that = this;
            setTimeout(() => {
              that.loading = false;
              that.tableData5 = this.tranListToTreeData1(
                res.data.checkProjectFirstList
              );
              this.navigatepageNums = that.tableData5.length;
              that.$nextTick(() => {
                that.$refs.multipleTable.doLayout();
              });
            }, 200);
          } else {
            this.loading = false;
            this.$message.error(res.msg);
            return false;
          }
        })
        .catch((error) => {
          console.log(error);
        });
    },
    // 点击当前行
    getRowInfo(e) {
      this.fIds = e.F_Id;
      // this.getCheckList(e.enCode);
    },
    getRowInfo1(e) {
      this.fId = e.F_EnCode;
      this.isHave = e.isHave;
      this.F_Note = e.F_Note;
    },
    // 点击当前行变色
    rowChange(val) {
      this.currentRow = val;
    },
    // 获取页面容器高度
    getHeight() {
      var h = document.documentElement.clientHeight; //获取页面可见高度
      // var w = document.documentElement.clientWidth; //获取页面可见高度
      this.dialogHeight = h * 0.3 + "px";
      this.dialogHeightsa = h * 0.45 + "px";
      this.dialogHeights = h * 0.95 + "px";
    },
    handleNodeClick(data) {
      this.showName = data.fShortname; //顶部显示机构名
      this.getDataList(data.fCompanyid);
    },
    handleClick(row, num) {
      this.fId = row.F_Id;
      this.printFile(num);
    },
    openDialog1(row) {
      this.dialogCheckVisible = true;
      this.isHave = row.isHave;
      this.F_Note = row.F_Note;

      this.getCheckList(row.F_EnCode);
    },

    // 获取检测记录
    async getCheckList(id) {
      if (this.isHave > 0 && this.F_Note != "") {
        this.dialogCheckVisible = true;
        this.loadingCheckDialog = true;
        getConcreteChecksampleProjectList({ enCode: id }).then((res) => {
          if (res.errcode == 0) {
            this.loadingCheckDialog = false;

            this.CheckList = res.data.checkConcretesampleprojectList;
          } else {
            this.$message.error(res.msg);
            this.loadingCheckDialog = false;
          }
        });
      } else {
        this.$message.error("请选择可查看数据");
      }
      // const { data: res } = await this.$http.post(
      //   "roadApi/getConcreteSampleList.do",
      //   {
      //     enCode: id,
      //   }
      // );
    },
    openDialog(row) {
      this.projectName = row.F_ProjectName;
      this.equipmentDetailId = row.fId;
      this.edit(row.fId);
      this.activeIndex = "1";
      this.dialogTableVisibled = true;
    },
    // handleSelect(key) {
    //   this.activeIndex = key;
    // },
    async getDetails(id) {
      this.loadingDialog1 = true;
      const { data: res } = await this.$http.post(
        "App/Check/getConcreteChecksampleByFid.do",

        {
          fId: id,
        }
      );

      if (res.errcode == 0) {
        this.loadingDialog1 = false;
        this.formData = res.data.lrCheckConcretesample;
      } else {
        this.$message.error(res.msg);
        this.loadingDialog1 = false;
      }
    },
  },
};
</script>

<style scoped>
.el-table .warning-row {
  background: oldlace;
}

.el-table .success-row {
  background: #f0f9eb;
}

.pageFlagText {
  color: #171a1d;
  font-size: 16px;
}
</style>